package com.gui.base;

public class TestSwitch {

    public static void main(String[] args) {
        testSwitch("3Qj");
        testSwitch("2pj");
        testSwitch("3Qj1");

    }

    private static void testSwitch(String key) {
        System.out.printf("key: %s, hashcode: %d%n", key, key.hashCode());
        switch (key) {
            case "3Qj":
                System.out.println("3Qj");
                break;
            case "2pj":
                System.out.println("2pj");;
                break;
            default:
                System.out.println("default");
        }
    }
}
